package com.shop.entity;

import java.util.Date;

/*CREATE TABLE collection (
`id` BIGINT(16) NOT NULL auto_increment PRIMARY KEY COMMENT '会员编号（主键）',
`date` TIMESTAMP NOT NULL COMMENT '当前时间',
`goods_id` BIGINT(16) NULL COMMENT '所需的商品编号',
`member_id` BIGINT(16) COMMENT '会员编号（外键）',
foreign key (`member_id`) references member(`id`)
)ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;*/
public class Collection {
	private Integer id ;
	private String date ;
	private Integer goods_id ; 		//不是外键
	private Member member ; 	//会员外键	 	n:1
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getDate() {
		return date ;
	}

	public void setDate(String date) {
		this.date = date ;
	}

	public Integer getGoods_id() {
		return goods_id;
	}

	public void setGoods_id(Integer goods_id) {
		this.goods_id = goods_id;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public String toString(){
		return "Collection[id="+id+
				",date="+date+
				",goods_id="+goods_id+
				",MemberId="+member.getId()+
				"]" ;
	}
}
